package cn.oop;

import java.util.Random;

public class B extends A {
    public int pf(int i) {
        return i * i * i;
    }

    public int myPf(int i) {
        //调用自己pf()  this.pf(i)

        Random rand = new Random();
        int ok = rand.nextBoolean() ? this.pf(i) : super.pf(i);
        return ok;
    }
}
